package com.na.onlineservey.answeringtype

import com.docu.common.Action
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import com.na.onlineservey.AnsweringTypeService

@Component("readAnsweringTypeAction")
class ReadAnsweringTypeAction extends Action {

  @Autowired
  AnsweringTypeService answeringTypeInstanceService

  public Object preCondition(Object params, Object object) {
      //Not implement
      return null
  }

   public Object execute(Object params, Object object) {
    try {
       return answeringTypeInstanceService.read(Long.parseLong(params.id))
     } catch (Exception ex) {
     log.error(ex.message)
        return null
    }
  }

  public Object postCondition(Object params, Object object) {
    //Not implement
    return null
  }
}